package com.cheston.message;


import com.cheston.common.db.mybatis.EnableMysqlBatis;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@ComponentScan(basePackages = "com.cheston")
@EnableMysqlBatis
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.cheston")
public class MessageApp {

    final static Logger LOGGER = LoggerFactory.getLogger(MessageApp.class);

    public static void main(String[] args) {
        try {
            SpringApplication app = new SpringApplication(MessageApp.class);
            app.setAllowCircularReferences(true);
            app.setBannerMode(Banner.Mode.OFF);
            app.setWebApplicationType(WebApplicationType.SERVLET);
            app.run(args);
        } catch (Throwable e) {
            LOGGER.error("Startup exception", e);
        }

    }
}
